/*
 * @description: 功能
 * @author: Yoke
 * @Date: 2024-08-28 15:28:11
 */

import { type FormRules } from "naive-ui";


export const rules1: FormRules = {
    f1: {
        required: true,
        message: '公司名不能为空',
        trigger: 'input'
    },
    f2: {
        required: true,
        message: '项目名不能为空',
        trigger: 'input'
    },
    f3: {
        required: true,
        message: '公司名不能为空',
        trigger: 'input'
    },
    f4: {
        required: true,
        message: '项目名不能为空',
        trigger: 'input'
    },
    f5: {
        required: true,
        message: '机房名称不能为空',
        trigger: 'input'
    },
    [`table1[0].c2`]: {
        required: true,
        message: '姓名不能为空',
        trigger: 'input'
    },
    [`table1[0].c3`]: {
        required: true,
        message: '电话不能为空',
        trigger: 'input'
    },
    [`table1[0].c4`]: {
        required: true,
        message: '姓名不能为空',
        trigger: 'input'
    },
    [`table1[0].c5`]: {
        required: true,
        message: '部门不能为空',
        trigger: 'input'
    },
    [`table1[0].c6`]: {
        required: true,
        message: '电话不能为空',
        trigger: 'input'
    },
    [`table1[0].c7`]: {
        required: true,
        message: '姓名不能为空',
        trigger: 'input'
    },
    [`table1[0].c8`]: {
        required: true,
        message: '电话不能为空',
        trigger: 'input'
    },
    [`table1[0].c9`]: {
        required: true,
        message: '时间不能为空',
        type: 'number',
        trigger: ['input', 'select']
    },
    f6: {
        required: true,
        message: '工程概况不能为空',
        trigger: 'input'
    },
    f7: {
        required: true,
        message: '工程概况图不能为空',
        type: 'object',
        trigger: ['change', 'select', 'input', 'blur'],
        validator: (_, value) => {
            return value?.length > 0
        }
    },
    f8: {
        required: true,
        message: '工程概况图名不能为空',
        trigger: 'input',
    },
    f9: {
        required: true,
        message: '工程概况图不能为空',
        type: 'object',
        trigger: ['change', 'select', 'input', 'blur'],
        validator: (_, value) => {
            return value?.length > 0
        }
    },
}


export const rules2: FormRules = {
    f16: {
        required: true,
        message: '机房平面布置图不能为空',
        type: 'object',
        trigger: ['change', 'select', 'input', 'blur'],
        validator: (_, value) => {
            return value?.length > 0
        }
    },
}